﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AutoMapper;
using FluentAssertions;
using Portal.Model;
using Portal.Presentation.Models;

namespace Portal.Presentation.Tests.Units.AutoMapper
{
	[TestClass]
	public class UserViewModelToUserInterfaceTests : BaseTests
	{
		protected override void InitializeTest()
		{

		}

		[TestMethod]
		public void UserViewModel_New_IUser()
		{
			var model = new UserInfoDataModel()
			{
				FirstName = "first name",
				LastName = "last name"
			};
			var user = Mocks.Stub<IUser>();

			Mocks.ReplayAll();

			model.MapUpdate<UserInfoDataModel, IUser>(user);

			user.FirstName.Should().Be(model.FirstName);
			user.LastName.Should().Be(model.LastName);

		}
	}
}
